package com.company.LifeCycleThreadPool;

import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;

/**
 * 作者  Administrator
 * 时间  2017/6/2 13:32
 * 文件  ThreadPoolsDemo
 * 描述
 */
public class LifeCycleTest {
	public static void main(String[] args) {
		final MyThreadPoolExecutor cachedThreadPool =
				new MyThreadPoolExecutor(0,
						Integer.MAX_VALUE, 1L,
						TimeUnit.SECONDS, new SynchronousQueue<Runnable>());

		cachedThreadPool.execute(new Runnable() {
			@Override
			public void run() {
				System.out.println("线程：" + Thread.currentThread().getName() + ",正在执行任务");
			}
		});



	}
}
